package com.kpmg.datalake.common.vo;

import com.alibaba.fastjson.JSONObject;

import java.io.Serializable;

/**
 * @author Alex.zhao [alex.zhao@kpmg.com]
 * @since Created on azhao6 on 2018-06-27 12:54:19
 */
public class PageDTO<T extends Serializable> implements Serializable {

    private Integer page;
    private Integer pageSize;
    private Long totalSize;
    private T records;

    public PageDTO(Integer page, Integer pageSize) {
        this.page = page;
        this.pageSize = pageSize;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(Long totalSize) {
        this.totalSize = totalSize;
    }

    public T getRecords() {
        return records;
    }

    public void setRecords(T records) {
        this.records = records;
    }

    @Override
    public String toString() {
        return "PageDTO{" + JSONObject.toJSONString(this);
    }
}
